package cn.softgame.jserver.queue;


public class QueueFactory {
	private final static MessageQueue tcpQueue = new MessageQueue();
	private final static MessageQueue udpQueue = new MessageQueue();
	public final static int TCP_QUEUE=1;
	public final static int UDP_QUEUE=2;
	private final static QueueFactory factory = new QueueFactory();
	
	public static QueueFactory getInstance(){
		return factory;
	}
	
	public MessageQueue getQueue(int queueType){
		if(queueType==TCP_QUEUE){
			return tcpQueue;
		}else{
			return udpQueue;
		}
	}
}
